<style include="settings-shared"></style>

<settings-animated-pages id="pages" section="crostini"
    focus-config="[[focusConfig_]]">
  <div route-path="default">
    <div id="crostini" class="settings-box two-line first"
        actionable$="[[prefs.crostini.enabled.value]]"
        on-click="onSubpageTap_">
      <div class="start">
        $i18n{crostiniPageLabel}
        <div class="secondary" id="secondaryText">
          <localized-link
              localized-string="[[i18nAdvanced('crostiniSubtext')]]">
          </localized-link>
        </div>
      </div>
      <template is="dom-if" if="[[!allowCrostini]]" restamp>
        <cr-policy-indicator indicator-type="userPolicy">
        </cr-policy-indicator>
      </template>
      <template is="dom-if" if="[[prefs.crostini.enabled.value]]">
        <cr-icon-button class="subpage-arrow"
            aria-label="$i18n{crostiniPageTitle}"
            aria-describedby="secondaryText"
            aria-roledescription="$i18n{subpageArrowRoleDescription}">
        </cr-icon-button>
      </template>
      <template is="dom-if" if="[[!prefs.crostini.enabled.value]]">
        <div class="separator"></div>
        <cr-button id="enable"
            disabled$="[[disableCrostiniInstall_]]"
            on-click="onEnableTap_"
            aria-describedby="secondaryText"
            deep-link-focus-id$="[[Setting.kSetUpCrostini]]">
          $i18n{crostiniEnable}
        </cr-button>
      </template>
    </div>
  </div>

  <template is="dom-if" route-path="/crostini/details">
    <settings-subpage page-title="$i18n{crostiniPageLabel}">
      <settings-crostini-subpage prefs="{{prefs}}">
      </settings-crostini-subpage>
    </settings-subpage>
  </template>

  <template is="dom-if" route-path="/crostini/androidAdb">
    <settings-subpage page-title="$i18n{crostiniArcAdbTitle}">
      <settings-crostini-arc-adb prefs="{{prefs}}">
      </settings-crostini-arc-adb>
    </settings-subpage>
  </template>

  <template is="dom-if" route-path="/crostini/portForwarding">
    <settings-subpage page-title="$i18n{crostiniPortForwarding}">
      <settings-crostini-port-forwarding prefs="{{prefs}}">
      </settings-crostini-port-forwarding>
    </settings-subpage>
  </template>

  <template is="dom-if" route-path="/crostini/exportImport">
    <settings-subpage page-title="$i18n{crostiniExportImportTitle}">
      <settings-crostini-export-import prefs="{{prefs}}">
      </settings-crostini-export-import>
    </settings-subpage>
  </template>

  <template is="dom-if" route-path="/crostini/sharedPaths">
    <settings-subpage page-title="$i18n{guestOsSharedPaths}">
      <settings-guest-os-shared-paths
          guest-os-type="crostini" prefs="{{prefs}}">
      </settings-guest-os-shared-paths>
    </settings-subpage>
  </template>

  <template is="dom-if" route-path="/crostini/sharedUsbDevices">
    <settings-subpage page-title="$i18n{guestOsSharedUsbDevicesLabel}">
      <settings-guest-os-shared-usb-devices guest-os-type="crostini">
      </settings-guest-os-shared-usb-devices>
    </settings-subpage>
  </template>

  <template is="dom-if" route-path="/crostini/extraContainers">
    <settings-subpage page-title="$i18n{crostiniExtraContainersLabel}">
      <settings-crostini-extra-containers guest-os-type="crostini">
      </settings-crostini-extra-containers>
    </settings-subpage>
  </template>
</settings-animated-pages>

